/**
 * This is a simple kernel module.If you want to write a functional module,
 * you can add your code based on this file.
 * Wang Sen (C) <senwang@linux.vnet.ibm.com>
 * Wang Sen (C) <kelvin.xupt@gmail.com>
 * 2012.3.17
 */
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/version.h>
#include <linux/sched.h>
#include <linux/moduleparam.h>

MODULE_LICENSE("GPL");

static char *whom = "world";
static int howmany = 1;

/**
 * The param types should be bool invbool charp int long short uint ulong ushort
 */
module_param(howmany, int, S_IRUGO);
module_param(whom, charp, S_IRUGO);

static int __init start_init(void)
{
	int i = 0;
	for (i = 0; i < howmany; i++) {
		printk("hello,%s\n", whom);
	}
	printk("Kernel version: 0x%x\n", LINUX_VERSION_CODE);
	return 0;
}

static void __exit start_exit(void)
{
	printk("See you");
}

module_init(start_init);
module_exit(start_exit);
